<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false"%>
<script type="text/javascript">
    function ajaxSubmit() {
        if (!(/^1[3|4|5|8][0-9]\d{4,8}$/.test($("input[name='phone']").val()))) {
            BJUI.alertmsg("warn", "手机号格式不正确")
            return
        }
        if (!/^[0-9a-zA-Z\u4e00-\u9fa5]{1,15}$/.test($("input[name='name']").val())) {
            BJUI.alertmsg("warn", "姓名格式不正确")
            return
        }
        BJUI.ajax('doajax', {
            url: '/admin/salesman/investaadviser/inInvestaAdviser',
            data: {
                "name": $("input[name='name']").val(),
                "numb": $("input[name='numb']").val(),
                "phone": $("input[name='phone']").val(),
                "remarks": $("input[name='remarks']").val()
            },
            loadingmask: true,
            okCallback: function () {
                BJUI.navtab('refresh');
            }
        })
    }
</script>
<div class="bjui-pageHeader">
    <!-- 页面头部 -->
    <div align="center">添加顾问</div>
</div>
<div class="bjui-pageContent" style="top: 0; bottom: 35px; padding-left: 150px">
    <form action="/admin/salesman/investaadviser/inInvestaAdviser" data-toggle="validate" data-alertmsg="true">
        <div data-layout-h="0" class="bjui-row col-1">
            <label class="row-label">姓名</label>
            <div class="row-input">
                <input type="text" data-rule="required" name="name" size="30">
            </div>
            <label class="row-label">公司编号</label>
            <div class="row-input">
                <input type="text" data-rule="required" name="numb" size="30">
            </div>
            <label class="row-label">手机号码</label>
            <div class="row-input">
                <input type="text" data-rule="mobile" name="phone" size="30">
            </div>
            <label class="row-label">备注</label>
            <div class="row-input">
                <input type="text" name="remarks" size="30">
            </div>
        </div>
    </form>
</div>
<div class="bjui-pageFooter">
    <ul>
        <li>
            <button type="button" class="btn-close btn" data-icon="close"><i class="fa fa-close"></i> 取消</button>
        </li>
        <li>
            <button type="button" class="btn-default btn" data-icon="save" onclick="ajaxSubmit()"><i
                    class="fa fa-save"></i> 保存
            </button>
        </li>
    </ul>
</div>